using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;

namespace ProjectManageSystemApi.DbEntity
{

    /// <summary>
    /// 用户表
    /// </summary>
    [JsonObject(MemberSerialization.OptIn), Table(Name = "sys_core_user", DisableSyncStructure = true)]
	public partial class SysCoreUser {

		/// <summary>
		/// 主键
		/// </summary>
		[JsonProperty, Column(Name = "id", DbType = "bigint", IsPrimary = true, IsIdentity = true)]
		public long Id { get; set; }

		/// <summary>
		/// 所属客户主键
		/// </summary>
		[JsonProperty, Column(Name = "client_id", DbType = "bigint")]
		public long? ClientId { get; set; } = 0;

		/// <summary>
		/// 创建时间
		/// </summary>
		[JsonProperty, Column(Name = "create_at", DbType = "datetime")]
		public DateTime? CreateAt { get; set; }

		/// <summary>
		/// 创建人员
		/// </summary>
		[JsonProperty, Column(Name = "create_by", DbType = "bigint")]
		public long? CreateBy { get; set; }

		/// <summary>
		/// 描述
		/// </summary>
		[JsonProperty, Column(Name = "description", StringLength = 1024)]
		public string Description { get; set; }

		/// <summary>
		/// 设备号
		/// </summary>
		[JsonProperty, Column(Name = "device_no", StringLength = 64)]
		public string DeviceNo { get; set; }

		/// <summary>
		/// 邮箱
		/// </summary>
		[JsonProperty, Column(Name = "email", StringLength = 64)]
		public string Email { get; set; }

		/// <summary>
		/// 工号
		/// </summary>
		[JsonProperty, Column(Name = "employee_code", StringLength = 8)]
		public string EmployeeCode { get; set; }

		/// <summary>
		/// 图标链接或者Base64字符串
		/// </summary>
		[JsonProperty, Column(Name = "icon", StringLength = 256)]
		public string Icon { get; set; }

		/// <summary>
		/// 姓名
		/// </summary>
		[JsonProperty, Column(Name = "name", StringLength = 64)]
		public string Name { get; set; }

		/// <summary>
		/// 用户密码
		/// </summary>
		[JsonProperty, Column(Name = "password", StringLength = 32)]
		public string Password { get; set; }

		/// <summary>
		/// 电话
		/// </summary>
		[JsonProperty, Column(Name = "phone", StringLength = 16)]
		public string Phone { get; set; }

		[JsonProperty, Column(Name = "shop_code", StringLength = 8)]
		public string ShopCode { get; set; }

		/// <summary>
		/// 状态(0:无效,1:有效)
		/// </summary>
		[JsonProperty, Column(Name = "status", DbType = "int")]
		public int? Status { get; set; } = 1;

		/// <summary>
		/// 类型(0:其他、10:系统、20:客户、30:应用,40:充点宝)
		/// </summary>
		[JsonProperty, Column(Name = "type", StringLength = 4)]
		public string Type { get; set; } = "0";

		/// <summary>
		/// 更新时间
		/// </summary>
		[JsonProperty, Column(Name = "update_at", DbType = "timestamp")]
		public DateTime? UpdateAt { get; set; }

		/// <summary>
		/// 更新人员
		/// </summary>
		[JsonProperty, Column(Name = "update_by", DbType = "bigint")]
		public long? UpdateBy { get; set; }

		/// <summary>
		/// 用户名
		/// </summary>
		[JsonProperty, Column(Name = "username", StringLength = 32)]
		public string Username { get; set; }

	}

}
